package org.hwadee.entity;

import org.springframework.stereotype.Component;

@Component
public class User {
    /* 用户ID */
    private Integer userId;
    /* 用户名 */
    private String username;
    /* 用户密码 */
    private String password;
    /* 用户昵称 */
    private String nickname;
    /** 用户性别
     * 0为男性，1为女性
     */
    private Integer sex;
    /** 用户信息
     * 0为用户，1为管理员
     */
    private Integer state = 0;
    /** 用户状态
     * 0为已被删除，1为状态正常
     */
    private Integer userStatus = 1;

    private Integer postCount;

    public User() {
    }

    public User(Integer userId, String username, String password, String nickname, Integer sex, Integer state, Integer userStatus) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.sex = sex;
        this.state = state;
        this.userStatus = userStatus;
    }

    public Integer getPostCount() {
        return postCount;
    }

    public void setPostCount(Integer postCount) {
        this.postCount = postCount;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", sex=" + sex +
                ", state=" + state +
                ", userStatus=" + userStatus +
                '}';
    }
}
